package com.ruoyi.zzw.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zzw.mapper.DepartmentManageMapper;
import com.ruoyi.zzw.domain.DepartmentManage;
import com.ruoyi.zzw.service.TDepartmentManageService;

/**
 * 部门Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-06
 */
@Service
public class DepartmentManageServiceImpl implements TDepartmentManageService
{
    @Autowired
    private DepartmentManageMapper departmentManageMapper;

    /**
     * 查询部门
     * 
     * @param cDepartmentId 部门主键
     * @return 部门
     */
    @Override
    public DepartmentManage selectTDepartmentManageByCDepartmentId(Long cDepartmentId)
    {
        return departmentManageMapper.selectTDepartmentManageByCDepartmentId(cDepartmentId);
    }

    /**
     * 查询部门列表
     * 
     * @param departmentManage 部门
     * @return 部门
     */
    @Override
    public List<DepartmentManage> selectTDepartmentManageList(DepartmentManage departmentManage)
    {
        return departmentManageMapper.selectTDepartmentManageList(departmentManage);
    }

    /**
     * 新增部门
     * 
     * @param departmentManage 部门
     * @return 结果
     */
    @Override
    public int insertTDepartmentManage(DepartmentManage departmentManage)
    {
        return departmentManageMapper.insertTDepartmentManage(departmentManage);
    }

    /**
     * 修改部门
     * 
     * @param departmentManage 部门
     * @return 结果
     */
    @Override
    public int updateTDepartmentManage(DepartmentManage departmentManage)
    {
        return departmentManageMapper.updateTDepartmentManage(departmentManage);
    }

    /**
     * 批量删除部门
     * 
     * @param cDepartmentIds 需要删除的部门主键
     * @return 结果
     */
    @Override
    public int deleteTDepartmentManageByCDepartmentIds(Long[] cDepartmentIds)
    {
        return departmentManageMapper.deleteTDepartmentManageByCDepartmentIds(cDepartmentIds);
    }

    /**
     * 删除部门信息
     * 
     * @param cDepartmentId 部门主键
     * @return 结果
     */
    @Override
    public int deleteTDepartmentManageByCDepartmentId(Long cDepartmentId)
    {
        return departmentManageMapper.deleteTDepartmentManageByCDepartmentId(cDepartmentId);
    }
}
